package com.example.jdk17;

import java.util.Comparator;
import java.util.random.RandomGenerator;
import java.util.random.RandomGeneratorFactory;
import java.util.stream.Stream;

public class RandomGeneratorTest {
    public static void main(String[] args) {
        RandomGeneratorFactory<RandomGenerator> factory = RandomGeneratorFactory.of("Random");
        for (int i = 0; i < 10; i++) {
            new Thread(() ->{
                RandomGenerator random = factory.create(100L);
                System.out.println(random.nextDouble());
            }).start();
        }
    }
}
